import type {
  EntityDto,
  ExtensibleFullAuditedEntityDto,
  ExtensibleObject,
  IHasConcurrencyStamp,
  IHasEntityVersion,
  IMultiTenant,
  PagedAndSortedResultRequestDto
} from '../type';

export interface GetOrganizationsInput extends PagedAndSortedResultRequestDto {
  filter?: string;
  parentId?: string;
}

export interface OrganizationDto
  extends ExtensibleFullAuditedEntityDto<string>,
    IMultiTenant,
    IHasConcurrencyStamp,
    IHasEntityVersion {
  code: string;
  tenantId?: string;
  displayName: string;
  parentId?: string;
}

export interface OrganizationTreeDto extends OrganizationDto {
  hasChildren?: boolean;
  children?: OrganizationTreeDto[];
}

export interface CreateOrganizationDto extends ExtensibleObject {
  parentId?: string;
  displayName: string;
}

export interface UpdateOrganizationDto extends ExtensibleObject, IHasConcurrencyStamp {
  displayName: string;
}

export interface OrganizationSelectDto extends EntityDto<string> {
  displayName: string;
  parentId?: string;
  code: string;
}
